Skip to content

SDK v6: ACDC card fields don’t remount after the checkout refreshes when #place_order is outside #payment (7193) - #4912

Open
Dinamiko wants to merge 1 commit into
dev/developfrom
dev/4879-sdk-v6-card-fields-stale-session
Open

Dinamiko wants to merge 1 commit into
dev/developfrom
dev/4879-sdk-v6-card-fields-stale-session

Conversation

@Dinamiko

Copy link
Copy Markdown
Collaborator

On the classic checkout with SDK v6, the card fields can start mounting before the SDK has loaded. If a checkout refresh replaces the card inputs during that wait, two mount runs are in flight. The older run can finish last. It then mounts its fields into the detached inputs and replaces the tracker the submit reads to check whether the fields are filled. The buyer's next Place order click then fails with fields_empty. This can happen with Germanized, for example, which triggers a refresh when the payment method changes. A failed old run could also clear the current, working session.

PR Changes

ensureCardSession() now checks, once the SDK has loaded, whether its run is still the current one. A replaced run no longer mounts anything and hands over to the current run. A failed old run no longer clears the current session.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

🔗 Test this pull request with WordPress Playground

What's included:

  • ✅ WordPress (latest)
  • ✅ WooCommerce (latest)
  • ✅ PayPal Payments plugin v4.2.2-pr4912-46452096661-geb3a212 (built from this PR)

Login credentials:

  • Username: admin
  • Password: password

Plugin Details:

  • Version: 4.2.2-pr4912-46452096661-geb3a212
  • Commit: 88c11c4
  • Artifact: woocommerce-paypal-payments-4.2.2-pr4912-46452096661-geb3a212

💡 The demo environment resets each time you refresh. Perfect for testing!

🔄 This link updates automatically with each new commit to the PR.

⚠️ This URL is valid for 30 days from when this comment was last updated.


🤖 Auto-generated for commit 88c11c4 • Last updated: 2026-11-30T15:38:24.011Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant